<timer>


List of tags

 
Summary:
The timer element declares a card timer that exposes a means of processing inactivity or idle time. The timer is initialized and started at card entry and is stopped when the card is exited. Card entry is any task or user action that results in the card being activated, for example, navigating into the card. Card exit is defined as the execution of any task. The value of a timer will decrement from the initial value, triggering the delivery of an ontimer intrinsic event when it reaches zero. Note that timer resolution and the interaction of the timer with the browser's user interface and other time-based device functionality is implementation dependent.

It is an error to have more than one timer element in a card.

The timer timeout value is specified in units of one-tenth (1/10) of a second. The author should not expect a particular timer resolution and should provide the user with another means to invoke a timer's task. A timeout value of zero disables the timer.

Invoking a refresh task is considered an exit. The task stops the timer, commits its value to the context, and updates the browser accordingly. Completion of the refresh task is considered an entry to the card. At that time, the timer must resume.

Attributes:

Name

Data type

Mandatory

Default

Description

id

String

X

 

A unique name for the tag within the deck

class

String

X

 

A name of a class of which the tag is a member

name

String

X

 

Specifies the name of the variable to be set with the value of the timer. The name variable's value is used to set the timeout period upon timer initialisation. The variable named by the name attribute will be set with the current timer value when the card is exited or when the timer expires. For example, if the timer expires, the named variable is set to a value of zero.

value

String

 

 

Indicates the default value of the variable named in the name attribute - that is the timer value. When the timer is initialised and the variable named in the name attribute is not set, the name variable is assigned the value specified in the value attribute. If the name variable already contains a value, the value attribute is ignored. If the name attribute is not specified, the timeout is always initialised to the value specified in the value attribute.